Carbon


PBUnlockRangeAsync

Header: Files.h Carbon status: Supported

Unlocks a portion of a file that was previously locked by a call to PBLockRange.

OSErr PBUnlockRangeAsync (
    ParmBlkPtr paramBlock
);
paramBlock

A pointer to a basic File Manager parameter block.

function result

A result code.

DISCUSSION

The relevant fields of the parameter block are:

The PBUnlockRangeAsync function unlocks a portion of a file that you locked with PBLockRangeAsync. You specify the range by filling in the ioReqCount, ioPosMode, and ioPosOffset fields as described in the discussion of PBLockRangeAsync. The range of bytes to be unlocked must be the exact same range locked by a previous call to PBLockRangeAsync.

If for some reason you need to unlock a range whose beginning or length is unknown, you can simply close the file. When a file is closed, all locked ranges held by the user are unlocked.

The PBUnlockRangeAsync function does nothing if the file specified in the ioRefNum field is open with shared read/write permission but is not located on a remote server volume or is not located under a share point on a local volume.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)